package com.zzw.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzw.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

//create table agent (
//    id int primary key auto_increment comment '代理商id',
//    id_card varchar(18) not null comment '身份证号',
//    name varchar(20) not null comment '真实姓名',
//    nickname varchar(20) comment '昵称',
//    age int comment '年龄',
//    sex enum('1','2') comment '性别(1男 2女)',
//    phone varchar(11) not null comment '手机号',
//    parent_id int comment '上级id',
//    password varchar(32) not null comment '密码',
//    status enum('1','2','3') not null comment '状态(1待审核 2已通过 3已拒绝)',
//    agent_level enum('1','2','3') not null comment '代理商级别(1公司总代 2代理商 3商户)',
//    create_time timestamp not null default current_timestamp comment '创建时间'
//);
public class Agent extends BasicEntity {
    /**
     * 代理商id
     */
    private Integer id;
    /**
     * 身份证号
     */
    private String idCard;
    /**
     * 真实姓名
     */
    private String name;
    /**
     * 昵称
     */
    private String nickname;
    /**
     * 年龄
     */
    private String age;
    /**
     * 性别(1男 2女)
     */
    private String sex;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 上级id
     */
    private Integer parentId;
    /**
     * 密码
     */
    private String password;
    /**
     * 状态(1待审核 2已通过 3已拒绝)
     */
    private String status;
    /**
     * 代理商级别(1公司总代 2代理商 3商户)
     */
    private String agentLevel;
    /**
     * 创建时间
     */
    //解释

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")  // 处理表单参数
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  // 处理JSON参数
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getAgentLevel() {
        return agentLevel;
    }

    public void setAgentLevel(String agentLevel) {
        this.agentLevel = agentLevel;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Agent{" +
                "id=" + id +
                ", idCard='" + idCard + '\'' +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                ", age='" + age + '\'' +
                ", phone='" + phone + '\'' +
                ", parentId=" + parentId +
                ", password='" + password + '\'' +
                ", agentLevel='" + agentLevel + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
